| CreateODBCTime |
|
 |
| Description
|
|
Creates an ODBC time object.
|
| |
| Returns
|
|
A time object, in ODBC timestamp format.
|
| |
| Category
|
|
Date and time functions
|
| |
| Function syntax |
CreateODBCTime(date)
|
| |
| See also
|
|
CreateODBCDateTime, CreateTime
|
| |
| Parameters
|
| |
| Parameter |
Description |
| date |
Date/time object in the range 100 AD-9999 AD. |
|
| |
| Usage
|
|
When passing a date/time value as a string, you must enclose it in quotation marks. Otherwise, it is interpreted as a number representation of a date/time object.
|
| |
Example<h3>CreateODBCTime Example</h3>
<CFIF IsDefined("form.hour")>
Your time value, created with CreateTime...
<CFSET yourTime = CreateTime(form.hour, form.minute, form.second)>
<cfoutput>
<ul>
<li>Formatted with CreateODBCTime: #CreateODBCTime(yourTime)#
<li>Formatted with TimeFormat: #TimeFormat(yourTime)#
</ul></cfoutput>
</CFIF>
<CFFORM action="createodbctime.cfm" METHOD="post">
<PRE>
Hour <CFINPUT TYPE="Text" NAME="hour" VALUE="16" RANGE="0,23" MESSAGE="You must
enter an hour (0-23)" VALIDATE="integer" REQUIRED="Yes">
Minute <CFINPUT TYPE="Text" NAME="minute" VALUE="12" RANGE="0,59" MESSAGE="You
must
enter a minute value (0-59)" VALIDATE="integer" REQUIRED="Yes">
Second <CFINPUT TYPE="Text" NAME="second" VALUE="0" RANGE="0,59" MESSAGE="You
must
enter a value for seconds (0-59)" VALIDATE="integer" REQUIRED="Yes">
</PRE>
<p><INPUT TYPE="Submit" NAME=""> <INPUT TYPE="RESET">
</cfform>
|